Gui-driven symbol management and code generator

ABSTRACT

Embodiments of the present invention provide methods, program products, and systems for modifying source code by managing symbols indicating executable instructions. Embodiments of the present invention can be used to receive one or more symbols indicating executable instructions to be implemented via source code and generate a visual display comprising a dialog box supporting modification of source code that implements the executable instructions indicated by the one or more symbols. Responsive to receiving a user interaction with the dialog box resulting in modified source code, embodiments of the present invention can be used to generate modified source code or a representation of the modified source code that is shorter than the modified source code.

BACKGROUND

The present invention relates generally to the field of source codeeditors, and more particularly to GUI based structured editors.

Generally, a source code editor is a text based editor program used as aprogramming tool for editing source code. Source code editors may bestandalone applications or may be built into an integrated developmentenvironment. Typically, source code editors have features such as syntaxhighlight, indentation, autocomplete, and bracket matchingfunctionality.

SUMMARY

Embodiments of the present invention provide methods, program products,and systems for modifying source code by managing symbols indicatingexecutable instructions. In one embodiment of the present invention amethod is provided comprising: receiving one or more symbols indicatingexecutable instructions to be implemented via source code; generating avisual display comprising a dialog box supporting modification of sourcecode that implements the executable instructions indicated by the one ormore symbols; and responsive to receiving a user interaction with thedialog box resulting in modified source code, generating a visualdisplay comprising a dialog box output, wherein the dialog box output isone of the modified source code or a representation of the modifiedsource code that is shorter than the modified source code.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram view of a first embodiment of a systemaccording to the present invention;

FIG. 2 is a flowchart showing a first embodiment method performed, atleast in part, by the first embodiment system;

FIG. 3 is a block diagram showing a machine logic (for example,software) portion of the first embodiment system;

FIGS. 4A-4D are example screenshots of a visual display generated by aGUI structured editor on a mobile device, in accordance with anembodiment of the present invention;

FIGS. 5A-5F are example screenshots of a visual display generated by aGUI structured editor for on a mobile device, in accordance with anembodiment of the present invention;

FIGS. 6A-D are screenshots of different views in a dialog box, inaccordance with an embodiment of the present invention;

FIGS. 7A-D are example screenshots of a user selection for methodparameter scaffolding;

FIGS. 8A-D are example screenshots of the transition from a traditional,all-text source to a GUI structured editor display incorporatinggraphical icons, in accordance with an embodiment of the presentinvention; and

FIGS. 9A-9D are additional example screenshots of graphical icons thatcan be displayed using a GUI structured editor, in accordance with anembodiment of the present invention.

DETAILED DESCRIPTION

Embodiments of the present invention recognize that without a peripheralkeyboard, editing source code (e.g., typing) is considerably slower andmore error prone on mobile devices. In an object orientated language,user-defined symbols are used to name resources such as user-definedpackages, classes, methods, parameters, fields, and constants. Thesesymbols are combined together to form expressions and those expressionsare used to form definitions and instructions that give them scope andcontext. Embodiments of the present invention provide solutions formodifying source code by managing these symbols. For example, responsiveto user selections of these symbols, embodiments of the presentinvention can modify source code. In this manner, as discussed ingreater detail in this specification, embodiments of the presentinvention can be used to minimize typing and enhance usability of sourcecode editors. This Detailed Description section is divided into thefollowing sub-sections: (i) The Hardware and Software Environment; (ii)Example Embodiment; (iii) Further Comments and/or Embodiments; and (iv)Definitions.

I. The Hardware and Software Environment

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

An embodiment of a possible hardware and software environment forsoftware and/or methods according to the present invention will now bedescribed in detail with reference to the Figures. FIG. 1 is afunctional block diagram illustrating various portions of networkedcomputers system 100, including: GUI structured editor sub-system 102;mobile device 104; tablet 106, client 106; GUI structured editorcomputer 200; communication unit 202; processor set 204; input/output(I/O) interface set 206; memory device 208; persistent storage device210; display device 212; external device set 214; random access memory(RAM) devices 230; cache memory device 232; and program 300.

GUI structured editor sub-system 102 is, in many respects,representative of the various computer sub-system(s) in the presentinvention. Accordingly, several portions of GUI structured editorsub-system 102 will now be discussed in the following paragraphs.

GUI structured editor sub-system 102, mobile device 104, tablet 106, andclient 108 can be a laptop computer, tablet computer, netbook computer,personal computer (PC), a desktop computer, a personal digital assistant(PDA), a smart phone, or any programmable electronic device capable ofcommunicating with the client sub-systems via network 114. In certainembodiments, GUI structured editor sub-system 102, mobile device 104,tablet 106, and client 108 represent computer systems utilizingclustered computers and components to act as a single pool of seamlessresources when accessed through network 114. For example, suchembodiments may be used in a data center, cloud computing, storagenetwork (SAN), and network attached storage (NAS) applications. Incertain embodiments, GUI structured editor sub-system 102, mobile device104, tablet 106, and client 108, represent virtual machines. In general,GUI structured editor sub-system 102, mobile device 104, tablet 106, andclient 108 are representative of any electronic devices, or combinationof electronic devices, capable of executing machine-readable programinstructions.

Program 300 is a collection of machine readable instructions and/or datathat is used to create, manage and control certain software functionsthat will be discussed in detail, below, in the Example Embodimentsub-section of this Detailed Description section. For example, program300 is a graphic user interface structured editor that can receive andmanage one or more user-defined symbols indicating a function to beimplemented via source code that guarantees syntax correctness andproduces enhanced views and modifications of source code. Forillustrative purposes, the following discussion is made with respect toprogram 300 being local to GUI structured editor computer 200. However,it should be understood that in other embodiments, program 300 may belocal to one or more components of networked computers systems 100(e.g., mobile device 104, tablet 106, client 108).

GUI structured editor sub-system 102 is capable of communicating withother computer sub-systems via network 114. Network 114 can be, forexample, a local area network (LAN), a wide area network (WAN) such asthe Internet, or a combination of the two, and can include wired,wireless, or fiber optic connections. In general, network 114 can be anycombination of connections and protocols that will supportcommunications between server and client sub-systems.

GUI structured editor sub-system 102 is shown as a block diagram withmany double arrows. These double arrows (no separate reference numerals)represent a communications fabric, which provides communications betweenvarious components of GUI structured editor sub-system 102. Thiscommunications fabric can be implemented with any architecture designedfor passing data and/or control information between processors (such asmicroprocessors, communications and network processors, etc.), systemmemory, peripheral devices, and any other hardware components within asystem. For example, the communications fabric can be implemented, atleast in part, with one or more buses.

Memory 208 and persistent storage 210 are computer-readable storagemedia. In general, memory 208 can include any suitable volatile ornon-volatile computer-readable storage media. It is further noted that,now and/or in the near future: (i) external device(s) 214 may be able tosupply, some or all, memory for GUI structured editor sub-system 102;and/or (ii) devices external to GUI structured editor sub-system 102 maybe able to provide memory for GUI structured editor sub-system 102.

Program 300 is stored in persistent storage 210 for access and/orexecution by one or more of the respective computer processors 204,usually through one or more memories of memory 208. Persistent storage210: (i) is at least more persistent than a signal in transit; (ii)stores the program (including its soft logic and/or data), on a tangiblemedium (such as magnetic or optical domains); and (iii) is substantiallyless persistent than permanent storage. Alternatively, data storage maybe more persistent and/or permanent than the type of storage provided bypersistent storage 210.

Program 300 may include both machine readable and performableinstructions and/or substantive data (that is, the type of data storedin a database). In this particular embodiment, persistent storage 210includes a magnetic hard disk drive. To name some possible variations,persistent storage 210 may include a solid state hard drive, asemiconductor storage device, read-only memory (ROM), erasableprogrammable read-only memory (EPROM), flash memory, or any othercomputer-readable storage media that is capable of storing programinstructions or digital information.

The media used by persistent storage 210 may also be removable. Forexample, a removable hard drive may be used for persistent storage 210.Other examples include optical and magnetic disks, thumb drives, andsmart cards that are inserted into a drive for transfer onto anothercomputer-readable storage medium that is also part of persistent storage210.

Communications unit 202, in these examples, provides for communicationswith other data processing systems or devices external to GUI structurededitor sub-system 102. In these examples, communications unit 202includes one or more network interface cards. Communications unit 202may provide communications through the use of either or both physicaland wireless communications links. Any software modules discussed hereinmay be downloaded to a persistent storage device (such as persistentstorage device 210) through a communications unit (such ascommunications unit 202).

I/O interface set 206 allows for input and output of data with otherdevices that may be connected locally in data communication with GUIstructured editor computer 200. For example, I/O interface set 206provides a connection to external device set 214. External device set214 will typically include devices such as a keyboard, keypad, a touchscreen, and/or some other suitable input device. External device set 214can also include portable computer-readable storage media such as, forexample, thumb drives, portable optical or magnetic disks, and memorycards. Software and data used to practice embodiments of the presentinvention, for example, program 300, can be stored on such portablecomputer-readable storage media. In these embodiments the relevantsoftware may (or may not) be loaded, in whole or in part, ontopersistent storage device 210 via I/O interface set 206. I/O interfaceset 206 also connects in data communication with display device 212.

Display device 212 provides a mechanism to display data to a user andmay be, for example, a computer monitor or a smart phone display screen.

The programs described herein are identified based upon the applicationfor which they are implemented in a specific embodiment of theinvention. However, it should be appreciated that any particular programnomenclature herein is used merely for convenience, and thus theinvention should not be limited to use solely in any specificapplication identified and/or implied by such nomenclature.

The descriptions of the various embodiments of the present inventionhave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the describedembodiments. The terminology used herein was chosen to best explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed herein.

II. Example Embodiment

FIG. 2 shows a flowchart 250 depicting a method according to anembodiment of the present invention. FIG. 3 shows program 300 forperforming at least some of the method operations of flowchart 250. Thismethod and associated software will now be discussed over the course ofthe following paragraphs, with extensive reference to FIG. 2 (for themethod operation blocks) and FIG. 3 (for the software blocks). It shouldbe noted that this example embodiment (also referred to in thissub-section as the “present embodiment,” the “present example,” the“present example embodiment,” and the like) is used herein for examplepurposes, in order to help depict the scope of the present invention. Assuch, other embodiments (such as embodiments discussed in the FurtherComments and/or Embodiments sub-section, below) may be configured indifferent ways or refer to other features, advantages, and/orcharacteristics not fully discussed in this sub-section.

For illustrative purposes, the following example is discussed withrespect to a GUI structured editor (e.g., program 300) modifying Javasource code responsive to a user selecting user-defined symbols in avisual display (e.g., one or more dialog boxes). (Note: the term “JAVA”may be subject to trademark rights in various jurisdictions throughoutthe world and are used here only in reference to the products orservices properly denominated by the marks to the extent that suchtrademark rights may exist.) However, it should be understood that theGUI structured editor can modify source code of any programminglanguage.

Typically, the GUI structured editor displays a dialog box that hassymbols and/or graphical icons that correspond to actual functionalsource code language (e.g., a swirl graphical icon denotes a conditional“for loop” in Java). In this example, responsive to a user selection,the GUI structured editor generates a visual display, comprising adialog box that includes one or more symbols.

A “selection”, as used herein, refers to any input from selectableelements in a generated visual display. For example, when generating newsource code, a selection can be of one or more symbols (e.g., graphicalicons) representative of data and instructions for a programminglanguage. In this embodiment, a user can select a selectable element ona touch screen display. For example, a user may select a selectableelement using his or her finger. In other embodiments, a user can selecta selectable element by clicking on a selectable element (via a mouse).In yet other embodiments, a user can navigate selectable elements usingarrow keys and select selectable elements by pressing the “enter” buttonof a keyboard.

A “symbol”, as used herein, represents a selectable element (e.g., agraphical icon) that is representative of tasks for a programminglanguage. A task, can be any action to be implemented by source code andperformed by a computer. For example, a task can be to change a fontcolor which is implemented by source code to implement the change to thefont color. In some instances, a symbol may be a graphical icon (e.g., agraphic swirl) that represents instructions of a programming language(e.g., a conditional “for loop”). In other instances, a symbol may be agraphical icon created by a user that denotes an addition of a variable,an object within a method of a class, an available method of the objectwith one or more parameters that matches the characteristics of the typeof selected method signature, etc. consistent with a programminglanguage. Responsive to receiving symbols selected by a user, GUIstructured editor mod 304 can ensure that the generated instruction issyntactically correct and associated symbols have correct definitionswithin the scope of the code before the instruction is “committed” tothe program overall and to its associated view. For example, ininstances where a variable is deleted, GUI structured editor mod 304 canprompt the user by displaying a series of dialog boxes on lines thatwould need to be adjusted before a deletion can be committed. Where achange in a symbol name (e.g., for a variable) has been selected andmodified, GUI structured editor mod 304 can automate that change throughall affected sources within view.

In the context of modifying existing code, a selection can be of one ormore graphical icons (e.g., a cursor) that correspond to a line of codeto be modified. For example, a graphical icon that resembles a trianglecan denote a cursor. The cursor indicates a position within code (e.g.,the line of code that a user is editing). Responsive to receiving a userselection (e.g., double clicking the triangle icon) of the cursor, theGUI structured editor can pop up the display box which has the graphicalicons to add/modify/delete a new or existing symbol (e.g., to create anew variable within a selected method of a certain class).

Where existing user-defined symbols are present (e.g., for existingsource code), GUI structured editor mod 304 can generate dialog boxescompliant with the parameters of existing user defined symbols. Forexample, GUI structured editor mod 304 can display a dialog box for thechoice of parameters (e.g., i, j, k) for a method that is invoked (e.g.,“myOtherMethod”).

In this embodiment, graphical icons representing “add-after”,add-before”, “change”, and “delete current” can be used to change theposition of a cursor that determines the line of code in focus. In thisembodiment, a button marked with a “+” sign can be selected to display amenu of extra options such as “add”, “change”, or “remove a new class ormethod”. A button marked with a “dot” can be used to minimize the menuof extra options. For examples of other symbols, graphical icons, andselections, see the Further Comments and/or Embodiments sub-section ofthis Detailed Description.

In this example, a user has scrolled through existing source code andhas selected (via a graphical icon denoting a cursor) to modify a method(e.g., method Z) within a class (e.g., class Y). In particular, the userutilizes visual display dialog boxes generated by program 300 to createa user defined symbol (e.g., myZvar) and input an instruction (e.g.,“int myZvar=135”) in existing source code by selecting one or moresymbols and/or graphical icons displayed in the generated visual displaydialog boxes until all possible parameters (i.e., selections consistentwith an instruction) have been exhausted.

Processing begins at operation 252, where GUI structured editor mod 304prompts a user to make a selection in a generated visual display. Inthis example, GUI structured editor mod 304 prompts the user to make aselection in a generated visual display by presenting a user with one ormore symbols. For example, where there is no existing source code, GUIstructured editor mod 304 can display a symbol (e.g., a graphical icon)that denotes a cursor that may be selected. Where existing source codeneeds to be modified, GUI structured editor mod 304 can display theexisting source code and the symbol that denotes a cursor, which, whenselected, can trigger a display of a dialog box comprising more symbolsto modify the existing source code. In this example, a user has selected(via a cursor) to modify method Z within Class Y.

Processing proceeds at operation 254, where input/output mod 302receives one or more symbols indicating a function to be implemented viasource code. Continuing the above example, input/output mod 302 receivesone or more symbols selected by the user to modify method Z within ClassY. In other instances, input/output mod 304 can receive one or moreother symbols from a user selection (e.g., can receive a symbol createdby a user, a symbol to be modified, etc.).

Processing proceeds to operation 256, where GUI structured editor mod304 generates a visual display comprising one or more dialog boxes thatsupports modification of source code. In other words, GUI structurededitor mod 304 generates dialog boxes having one or more graphicalicons, responsive to receiving user selections of the one or moresymbols.

In this example, responsive to a user selection (via a cursor) to modifymethod Z within Class Y, GUI structured editor mod 304 displays a visualdisplay comprising an instruction dialog box that prompts the user for aselection of options displayed in an instruction dialog box. In thisexample, the instruction dialog box includes the following options thatare available for modifying method Z: conditional (e.g., if, else,switch, else); jump (e.g., label, break, continue, return, etc.);iteration (e.g., while loop, do while, for loop, etc.); exception (e.g.,try &catch, finally, throw, etc.); variable (e.g., declaration,assignment, etc.); and miscellaneous (e.g., invocation, assert, etc.).For examples of other selections, see the Further Comments and/orEmbodiments sub-section of this Detailed Description.

Continuing the example above, input/output mod 302 receives a userselection of a “declaration” as the instruction for method Z. In thisexample, the declaration dialog box can display options of symbols. Forexample, an option may be to select an existing symbol, which, in thisexample, is a variable along with other options unique to the selectedsymbol within method Z of class Y. In this example, a user has chosen todefine a new symbol and name it “MyZVar”.

Responsive to the user creation of the new symbol, GUI structured editormod 304 can generate a dialog box comprising options that correspond toavailable properties for the created variable. For example, GUIstructured editor mod 304 can generate a dialog box comprising optionsfor fundamental variable types (e.g., Boolean, byte, char, double,float, int, long, short, etc.), other characteristics associated withthe declaration (e.g., static, final, transient, volatile, array,initialize, etc.), and characteristics of data (e.g., private,protected, public, local, etc.).

In this example, a user has chosen the fundamental variable type “int”,has chosen to “initialize”, and has chosen that the data be “local”.Responsive to receiving a user selection of “initialize”, GUI structurededitor mod 304 can display optional characteristics associated with thedeclaration (e.g., constant, literal, method return value, variable,etc.). In this example, the user has chosen “literal”.

Responsive to receiving a user input of initializing a literal variable,GUI structured editor mod 304 can display a “literal number” dialog box.In this example, a user has selected the following numbers: 1, 3, and 5.

Processing proceeds to operation 258, where, responsive to receiving auser interaction with the dialog box resulting in modified source code,GUI structured editor mod 304 generates a visual display comprising adialog box output when all options (e.g., selected symbols and/orgraphical icons) have been selected.

A “dialog box output”, as used herein, refers to a display of modifiedsource code generated in response to user selections of the one or moresymbols and/or graphical icons. In some instances, the display ofmodified source code can be the actual source code (e.g., Java sourcecode). In other instances the display of modified source code can be agraphical representation of the modified source code that is shorterthan the modified source code, as discussed in greater detail withregard to FIGS. 4-9.

Continuing the above example, responsive to a user selection of thenumber “135”, GUI structured editor mod 304 can recognize that there areno other options available for the created variable (e.g., myZvar)within method Z of class Y. Responsive to recognizing that there are noother options available, GUI structured editor mod 304 can generate aninstruction of “int myZvar =135” and generate two dialogue boxes formethod Z and class Y, respectively which can show the modified sourcecode in traditional text form or show a graphical representation of themodified source code that is shorter than the modified source code.Thus, embodiments of the present invention can, responsive to receivingone or more symbols and/or graphical icons from the generated dialogboxes, generate source code.

Accordingly, in this embodiment, user-defined symbols and management ofthese symbols and their respective supporting lines of code can be usedto reduce errors in source code writing and editing. Specifically, bymanaging user-defined symbols and respective supporting lines of codethrough a GUI based structured editor (e.g., through a series ofdisplayed dialogue boxes generated in response to user selections)provides a user with the ability to make incremental changes andmaintain consistency in the addition, change, and deletion of bothsymbols and logic. By performing the operational steps of flowchart 200,embodiments of the present invention can generate source code that issyntactically correct based on user selections without having to use akeyboard.

In other embodiments of the present invention, GUI structured editor mod304 can add code commentary, responsive to user input. For example,responsive to a user selecting a graphical icon (e.g., a button), GUIstructured editor mod 304 can display formatting options for commentarya user can add to source code. Examples of formatting options that GUIstructured editor mod 304 can display are: full comments included on theside, truncated comments to keep lines of code tighter together, or nocommentary at all, as discussed in greater detail with regard to theFurther Comments and/or embodiments subsection of this DetailedDescription. GUI structured editor mod 304 can propagate commentaryassociated with a particular user-defined symbol across multiplemethods/classes, etc. In other words, a user can utilize GUI structurededitor mod 304 to update all views with a single update.

In another embodiment of the present invention, GUI structured editormod 304 modifies displays of pseudocode, responsive to a user selection.For example, GUI structured editor mod 304 can modify a view of sourcecode to collapse different levels of groups, such as nested loops. Inother words, GUI structured editor mod 304 can alter a view of thesource code to display headings of instructions without displaying theinstructions themselves. In another example, GUI structured editor mod304 can be used to generate code scaffolding, as discussed in greaterdetail, with regard to FIGS. 6A-6D in the Further Comments and/orEmbodiments subsection of this Detailed Description.

III. Further Comments and/or Embodiments

Some embodiments of the present invention recognize the following facts,potential problems and/or potential areas for improvement with respectto the current state of the art: (i) use of a free-form editor is proneto introducing many compile-time errors; (ii) editing source code onmobile devices is slower and more error prone without the use of aperipheral keyboard; and/or (iii) the use of parenthesis in conditionalsis often faulty and sometimes difficult to detect in code reviews.

Some embodiments of the present invention may include one, or more, ofthe following features, characteristics and/or advantages: (i) a GUIbased structured editor that can unlock the potential of mobileprogramming by allowing users to select symbols that correspond tosource code, where existing source code can be modified with fewererrors and increased efficiency; (ii) usage of symbolic names in theaddition, change, or deletion of any line of code, which would beselected via a list box, which can be filtered by the scope and thecontext of the line where the symbols were to be used; (iii)capabilities to switch from a graphical representation of source code tothe traditional view of a free-form text editor (in a read-only view toensure that syntax correctness was maintained); (iv) retention of codecommentary having no adverse effect on proper syntax of reserved oruser-defined symbols; (v) code commentary that includes audio, image,and video commentary; (vi) user preferences to present commentary thatcan be displayed in block comments above code, truncated versions to theside of code, and/or even a view where the commentary isn't shown atall; (vii) providing consistency in the addition, change, and deletionof source code using both symbols and logic; (viii) providing theability to make incremental changes with the guarantee of compile-timecorrectness; (ix) avoiding mental context switches of multiplecompile-time errors; (x) programmers need not focus on syntax or theformatting of that syntax; (xi) the ability to manage screen real estatethat would make it possible to provide Integrated DevelopmentEnvironments (IDEs) to mobile devices and/or to code anywhere in anyprogramming language; and/or (xii) ability to track any dependencies ofearlier usage regarding the user-defined symbols, data type, scope, andother attributes, and alerting the programmer of incompatibilities.

FIGS. 4A-4D are example screenshots of a visual display generated by aGUI structured editor on a mobile device, in accordance with anembodiment of the present invention. Specifically, FIGS. 4A-D depict anexample flow to create a user-defined symbol, including itsinitialization. In this example, a user has selected (via a cursor) tomodify existing source code of Method Z in Class Y. Responsive to theuser selection, the GUI structured editor has displayed an instructiondialog box.

FIG. 4A is an example screenshot of an instruction dialog box thatdisplays various options to construct code blocks, to control the flowaround those blocks, to declare the associated data, and to manipulatethat data.

Buttons 402 and 404 are for navigational purposes. For example,selecting button 402 may exit out of the GUI display while selectingbutton 404 advances the GUI display to a different screen.

The GUI structured editor can display option blocks associated withmethod Z. These option blocks include: blocks 406 that denote optionsfor conditionals, 408 that denote options for iterations, 410 thatdenote options for variables, 412 that denote options for jumps, 413that denotes options for exceptions, and 414 that denote options formiscellaneous. Options for block 406 include: if, else, switch, and elseif. Options for block 408 include: while loop, do while, and for loop.Options for block 410 include declaration and assignment. Options forblock 412, include: label, break, continue, and return. Options forblock 414, include: try and catch, finally, and throw. Options for block414 include: invocation and assert.

In this example, option 416 is selected by a user. Option 416 is adeclaration of a variable. Button 404 is selected by a user and,responsive to that selection, the GUI structured editor displays avisual display of a declaration dialog box, as discussed in greaterdetail with regard to FIG. 4B.

FIG. 4B is an example screenshot of a declaration menu that is displayedresponsive to a user-selected option 416. In this example, the GUI basedstructured editor prompts a user to select a previously designateduser-defined symbol or create a new user-defined symbol for the chosenmethod (e.g., method Z). The GUI based structured editor also lists theprimitive data types (e.g., Boolean, byte, char, double, float, int,long, and short) along with an object option (e.g., static, final,transient, volatile, array, initialize), variable attribute options(e.g., constant, literal, method return value, and variable), and thelevel of privacy (e.g., private, protected, public, and local).

In this example, the user has selected data type 418 which is “int”. Theuser has further selected object option 420 (e.g., initialize).Responsive to a user selection of variable attribute option 420, the GUIstructured editor can display variable attribute options (e.g.,constant, literal, method return value, and variable). In this example,the user has selected variable attribute option 422, which is literal.Further the user has selected option 424, which is “local”, for thelevel of privacy.

FIG. 4C is an example screenshot that is generated in response to a userselection. For example, responsive to receiving a user input of selecteddata type 418, object option 420, variable attribute option 422, andoption 422, the GUI based structured editor displays a literal numberdialog box.

In this example, the literal number dialog box includes number pad 426and display box 428. The GUI structured editor can then receive userinput (via number pad 426) to generate source code instruction that isdisplayed in display box 428. In this example, the user can input “135”using number pad 416. Accordingly, the GUI structured editor can displaythe following instruction in display box 418: “int myZvar =135”.

FIG. 4D is an example screenshot of a possible source code viewgenerated in response to user selections in FIGS. 4A-C. In this example,there are two dialog boxes 430 and 432. Buttons 434 a and 434 b aregraphical icons used for scrolling through different menus within therespective dialog boxes. In this embodiment, buttons 434 a and 434 b aretriangular shaped. In other embodiments, buttons 434 a and 434 b may beany combination of symbols and/or shapes. Selecting button 436 a hidesthe extra option items. In this embodiment, button 434 a is denoted by adot while 436 b is denoted by a “+” sign.

Dialog box 432 displays the current method being modified (e.g., methodZ). In this example, a “myZvar” variable has just been added as a localvariable and source code has been generated (e.g., int myZvar−135),responsive to the user selections made in FIGS. 4A-C. Button 438 is ahighlighted triangle that denotes a position of the cursor in line withsource code that is being modified. Responsive to a user selection ofbutton 438 (e.g., via double-tapping a touch screen), the GUI structurededitor can display a dialog box with options to add, change, or removeinstructions.

Dialog box 430 displays the Class which the method is a part of (e.g.,class Y). Selecting button 436 b can switch views to display a differentdialog. For example, selecting button 436 b can display, dialog box 430.Conversely, selecting button 436 a can hide dialog box 430 and displaydialog box 432. In this example, dialog box 430 is minimized for displaypurposes. In another embodiment, where a larger screen is available,FIG. 4D can be presented as a split screen that can display both dialogboxes 430 and 432 at the same time.

Selecting buttons 434 a and 434 b can toggle between different views ofthe same dialog box. For example, selecting button 434 b can display thenext class in a sequence of classes of dialog box 430. Selecting button434 a can display the previous class in a sequence of classes of dialogbox 430.

FIGS. 5A-5F are example screenshots of a visual display generated by aGUI structured editor for on a mobile device, in accordance with anembodiment of the present invention. Specifically, FIGS. 5A-F depict anexample flow when a conditional for a given class (e.g., Class Y) isselected (e.g., if a conditional “if” is selected as a user input inFIG. 4A).

FIG. 5A is an example screenshot of a “variable” dialog box that wasgenerated by the GUI structured editor in response to a user selectionof a conditional, “if”. In this screenshot, the variable dialog boxdisplays list 502 and display box 505. List 502 includes variables inalphabetical order along with corresponding types. For example, list 502displays variable “i” and its corresponding type “int”; variable “j” andits corresponding type “int”; variable “myYvar” and its correspondingtype “ClassW”; and so on. List 502 can include local variables to thecurrent method within view, parameters to that method, data within theclass, and the reference to the current instance of that class. In thisexample, the user has made selection 504. Selection 504 includes thevariable “myYvar” and its corresponding type “ClassW”. Responsive toselecting selection 504, the GUI structured editor populates display 505with the following source code instruction: if (myYvar.

FIG. 5B is an example screenshot generated in response to userselections of FIG. 5A (specifically, responsive to selection 504). Inthis example, the GUI structured editor displays a method dialog box. Inthis screenshot, the method dialog box displays list 506 and display box505. List 506 includes methods and return types. In this example, theuser has selected option 508 which includes “methodW4” and return type“int”. Responsive to receiving the user selection of option 508, the GUIstructured editor modifies the source code instruction to “if(myYvar.methodW4( )”, which is displayed in display box 505.

FIG. 5C is an example screenshot generated in response to userselections of FIG. 5B (specifically, responsive to the selection ofoption 508). In this example, the GUI structured editor displays anoperator dialog box. The GUI structured editor displays options for auser to select the operator and follow-on comparison type along withdisplay box 505.

For example, the GUI structured editor can display lists 510 and 512. Inthis example, list 510 displays one or more symbols to denote an“operator”. In this example, list 510 displays the subset of availableoperators (e.g., ==, !=, <, <=, >, >=, &, ̂, |, etc.). In otherembodiments, the GUI structured editor could present all of theoperators while creating a visual indication for operators that are notavailable. For example, the GUI structured editor can gray out operatorsthat are unavailable to alert the user of unavailable operators.

List 512 displays comparison choices. In this embodiment, comparisonchoices can include: constant, literal, method return value, value, etc.In this example, the user has selected option 514 which is an operatordenoted by the following symbol “<=” and option 516 which is “literal”.Accordingly, the GUI structured editor updates display box 505,responsive to the user selections (e.g., option 514 and 516) to displaythe following instruction: if (myYvar.method4( )<=.

FIG. 5D is an example screenshot generated in response to userselections of FIG. 5C (specifically, responsive to the selections ofoptions 514 and 516). In this example, the GUI structured editordisplays a literal number dialog box responsive to receiving an input ofa user selection of option 516.

In this example, the GUI structured editor displays number pad 518 andprompts the user for user input. In this example, user has selected thenumber “7” from number pad 518. The GUI structured editor can alsodisplay option 520 which is an option to add another expression.Accordingly, the GUI structured editor updates display box 505,responsive to the user selections (e.g., the number seven from receivedinput of number pad 518) to display the following instruction: if(myYvar.method4( )<=7.

In this example, the user has selected option 520. A user can thenrepeat the steps taken in FIGS. 5A-C to add an additional expression.For example, the user could repeat the flow of dialog boxes in order tocreate a list of simple expressions, then subsequently combine them forone conditional.

FIG. 5E is an example screenshot generated responsive to user selectionsof FIG. 5D. In this example, the GUI structured editor displays acombined instruction (i.e., expression) dialog box. The GUI structurededitor displays list 522, buttons 524 a-n, and buttons 526 a-n. List 522includes all of the generated simple expressions which correspond toJava source code. Buttons 524 a-n can be selected to change the order ofthe expression. For example, selecting the “+” button prioritizes anexpression over another expression. Conversely, the “−” buttondeprioritizes an expression over another expression. Buttons 526 a-n canbe selected to change between types of operators (e.g., logical “and”,logical “or”, etc.).

FIG. 5F is an example screenshot generated in response to userselections. Specifically, FIG. 5F displays an example screenshot of adialog box displayed, responsive to user selections of FIG. 5E. FIG. 5Fprovides an alternate view to further illustrate visual indicationscreated by the GUI structured editor to show user-specified groupingsand hierarchy of code.

In this embodiment, the GUI structured editor can use shading inaddition to a numbered order as visual indications (e.g., using numbersand/or shading) to denote user-specified groupings instead oftraditional parenthesis used to denote specified groupings (e.g., groupswith one parenthesis are considered in the same group with groups withtwo parentheses are considered to be in a different group). In thisexample, a user has selected buttons 524 a-n to indicate specifiedgroupings and hierarchy of expressions and has selected buttons 526 a-nto indicate different operators for the specified groupings. Forexample, responsive to user selections indicating order, the GUIstructured editor displays five different blocks, blocks 528-536.

Block 528 has an order of “1” and contains the following expression:myYvar.method4( )=7. Block 530 has an order of “2” and contains thefollowing expressions: i>5 and i<2. Block 532 has an order of “3” andcontains the following expressions: j==3, j==5, and j==7. Block 534 hasan order of “4” and contains the following expressions: myZvar!=3 andmyZvar!=5. Block 536 has an order of “5” and contains the followingexpression: myZvar!=7.

Accordingly, embodiments of the present invention can be used togenerate source code that is syntactically correct as well as a visualrepresentation of the generated source code in a format that is easy todigest. As shown, by FIGS. 5A-F, the visual representation of codeallows a user to easily distinguish between different groupings ofexpressions as opposed to the manually counting of parentheses thatwould otherwise indicate the groupings.

FIGS. 6A-D are screenshots of different views in a dialog box, inaccordance with an embodiment of the present invention. In thisembodiment, the GUI structured editor can generate a visual display ofmodified source code such that the representation of the modified sourcecode is shorter than the source code responsive to one or more userselections. In this example, the GUI structured editor displaysgraphical icons that replaces keywords (e.g., conventional “for loop”and “if” conditions) associated with source code for method Z in avisual display (e.g., a dialog box). Responsive to receiving a userselection of the graphical icons, the GUI structured editor can displayor hide more visual representations of source code.

FIG. 6A is an example screenshot of a display wherein a user ispresented options to make a selection. The GUI structured editordisplays box 616 which includes header 612. Header 612 is a graphicalrepresentation of an instruction of source code and includes columns 614a and 614 b and icon 602. In this example the columns 614 a and 614 b ofheader 612 replace semicolons used in source code. In this example, icon602 is a graphical icon of a swirl that denotes a “for loop”. Therefore,header 612 denotes the following source code: “for (int i: 0; i<3;i++){”.

Nested within box 616 is header 618 which includes icon 604. Icon 604 isa graphical icon of a question mark that denotes an “if” condition.Header 616 is a visual representation of source code that correspondsto: “if j<7}. The placement of header 618 within box 616 indicates thatthe contents are likewise nested within the source code instructionrepresented by header 618.

Icon 608 is a graphical icon of a triangle that depicts the option of acursor within the box 616 that indicates a position in lines of sourcecode where modifications are made responsive to user selections. Forexample, responsive to receiving a user selection of icon 608, the GUIstructured editor can display dialog boxes similar to the dialog boxesdescribed in FIGS. 4A-D to add, modify, or delete source code.

Icon 610 is a graphical icon of an ellipses which is used to denotecollapsed code within the group. Responsive to selecting icon 610, theGUI structured editor can display or collapse code. In this example, auser has selected icon 610.

FIG. 6B is an example screenshot displaying pseudocode responsive toreceiving the user selection of FIG. 6A. In this embodiment, responsiveto receiving a user input of icon 610, the GUI structured editor canswitch views to hide the contents of box 616 (not shown), leaving onlyheaders 612 and 618 as the display.

FIG. 6C is an example screenshot displaying visual representation of aninvocation method and the alternate view that can be displayedresponsive to a user selection. In this example, a user has selected an“invocation” as the instruction to modify in Method Z of Class Y.

In this example, the GUI structured editor (e.g., GUI structured editormod 304) displays display box 620 and list 622. Display box 620 displaysgenerated source code instructions, responsive to a user selection oflist 622. List 622 displays options of existing variables (e.g.,variable i and variable j) and their corresponding types (e.g., int) fora selected method. In this example, the user has selected option 624which is variable “j” and corresponding type “int”. Responsive toreceiving a user selection of option 624, the GUI structured editor candisplay the following source code: doOtherThing(i,j).

The user has further selected option 626 which is a box that displays acheck responsive to a user selection. Option 626 is an option togenerate a visual display of pseudocode of the generated source code, asdiscussed in greater detail with respect to FIG. 6D.

FIG. 6D is an example screenshot displaying pseudocode. In this example,the pseudocode is identified in box 620 as “doOtherThing”. In thisembodiment, the visual indication given to pseudocode is a text bubblewith a corresponding slanted line and italicized text which displays theparameter list of “doOtherThing”.

Accordingly, responsive to receiving user selections, embodiments of thepresent invention, can generate and toggle between different views toexpand or collapse blocks of source code (e.g., instructions within aparticular method of a class). In essence, this embodiment can be usedshow pseudocode (i.e., an alternate view of source code).

FIGS. 7A-D are example screenshots of a user selection for methodparameter scaffolding, in accordance with an embodiment of the presentinvention. In this example, a user has selected to modify method Z ofclass Y by generating functional code. However, the user has chosen notto input instructions for method Z.

FIG. 7A is an example screenshot of a GUI structured editor displayingan instruction dialog box similar to the instruction dialog boxdisplayed in FIG. 4A. In this example however, a user has selected fromoption 701, which is the miscellaneous box. Specifically, the user hasselected option 702, which represents an invocation.

FIG. 7B is an example screenshot of a GUI structured editor displaying avariable dialog box responsive to a user selection of Figure A. In thisscreenshot, the variable dialog box displays list 703 and display box704. List 703 includes variables in alphabetical order along withcorresponding types. For example, list 703 displays variable “i” and itscorresponding type “int”; variable “j” and its corresponding type “int”.In this example, the user has selected option 705 which includes “this”variable and “class Y” type. Display box 704 displays source codegenerated in response to receiving a user selection.

FIG. 7C is an example screenshot of a GUI structured editor displaying amethod dialog box responsive to receiving a user selection of option 705in FIG. 7B. In this example, the GUI structured editor displays a methoddialog box. In this screenshot, the method dialog box displays listdisplay box 704, list 706, options 710 and 712.

As previously discussed in FIG. 7B, display box displays source codegenerated in response to receiving a user selection. In this example,responsive to receiving a user selection of option 705, display box 704displays a generated invocation “doOtherThing(”.

List 706 includes methods and return types. In this example, the userhas selected option 708 which includes the method “doOtherThing” andreturn type “void”. Options 710 and 712 are view options that a user canselect to alter views. For example, responsive to receiving a userselection of option 710, the GUI structured editor can skip parameterfill in. In other words, selecting option 710 allows a user to frame outblocks of code without having to input the specific parameters of anoperation. Option 712 is a view option that, when selected, allows auser to alter a view (e.g., include the selection of option 708 as apseudocode view).

FIG. 7D is an example screenshot that displays the user's selection toskip parameter fill-ins and display the pseudocode for method“doOtherThing”. In this example, the GUI structured editor displays thepseudocode in text bubble 708 which can alert the user to fill in theparameters at a later time.

Accordingly, the GUI structured editor can incorporate pseudocode thatallows a user the option to keep the context of code without emphasizingcode flow. In other words, the GUI structured editor gives a user theoption to generate the necessary scaffolding of method parameterswithout having to provide the parameters themselves. This pseudocode canbe tracked by an integrated development environment which can then alerta user to provide the necessary detail to complete the methods.

In another embodiment, the GUI structured editor can store multipleversions of a mediation file which could facilitate the support ofmultiple versions that can be loaded based on user preference withoutcreating a compiled listing first. A “mediation file”, as used herein,refers to a file that stores changes in a given source code which canthen be used to generate one or more previous versions of the sourcecode (e.g., version 1, version 2, etc.).

In this embodiment, the GUI structured editor can store multipleversions of a mediation file by tracking addition, creation,modification, deletion, etc. of user-defined symbols and their contexts,compressed interpretations of the executable code, history records oftime, user, and content. For example, variable “myZvar” is used in threedifferent methods and has been modified twice. The GUI structured editorcan access the mediation file to alert the user that variable myZvar isused in three different methods and has at least two different versions,versions A and B. Responsive to a user selection of version A, the GUIstructured editor can load a view of version A.

Further, the GUI structured editor can optionally transfer multipleversions into the object code (granted, with an increased size to theexecutable code), where the link or even dynamic use of that code couldbe from selected versions. Thus, in certain embodiments of the presentinvention, the GUI structured editor can automate multi-pathing ofversioned code at some preference level for number of versionssupported. The end result permits the coexistence of both new and legacyenvironments to ensure application compatibility upstream.

In certain embodiments, the GUI structured editor can filter and displayknown changes to user-defined symbols to expedite reviews. Furthermore,dependencies could be coded into the mediation file, where a givenfunction is linked to one or more external functions at specifiedlevels. A user can add commentary using the GUI structured editor thatwould help diagnose issues early in later updates.

The GUI structured editor can leverage the stored deltas within the GUIdriven mediation code to generate multi-pathed object code. Resultingload modules could support multiple versions of functionality at agranular level, including pending changes. For example, load modulescould include change history of added, changed, and deleted lines ofcode (and could result in multi-pathed object code that couldconditionally run at lower levels for compatibility).

In certain embodiments, the GUI structured editor alerts the file formatto include additional data to provide the new functionality describedabove. Each instruction line and every user-defined symbol would haveits own versioning marker for example. Each logic file can be written toinclude place holder markers for incomplete instructions in support of“dynamic pseudo code”. Furthermore, dependencies on external parts canbe encoded into the mediation code, including specific versioninformation of those files.

In this controlled file format, multiple version deltas could bemaintained within the same file, simplifying version comparisons and theability to support pending changes in dependent interfaces. When aninterface is “committed” to a programming environment, that is, madeavailable for general use, then any change to that public interface,whether it's a symbolic name, signature change, return code value, etc.would be considered a deprecation, an incompatible update.

In other embodiments, a user can input commentary into lines of codeusing the GUI structured editor. The GUI structured editor can,responsive to receiving user input, tag various lines or variouscategories, such as an overall method or overall class and would beindexed as a separate entity within the file to facilitate the variousviewing preferences of the GUI structured editor. In some cases thatcommentary might be stored separately because it is a different mediasuch as audio, visual, or video format, or because it centralizes anexplanation that applies to more than one file. In this embodiment,commentary could also be included to describe the history of the changedelta. In instances where the GUI structured editor is used in anIntegrated Development Environment (IDE) that supports this centralizedform of mediation code, delta comparisons are presented in an easier toprocess format since the visual display is controlled by GUI dialogs andnot lines of source code. In this embodiment, changes in history can beexact, for example, with regard to symbol name changes, signaturechanges, line changes, regarding additions, changes, and deletions. Theversion field at each encoded instruction would help make this granularlevel of comparison possible.

In instances where a user desires that the encoded program alternativelyuse a traditional compiler or to provide source code separately, the GUIstructured editor could use the mediation code to export traditionaltext-based source as a snapshot. Similarly, the GUI structured editorcould import existing source code in traditional text format.

Accordingly, the mediation code as described above would provide a moreefficient file size compared to traditional text-based source code andprovide excellent life cycle management characteristics with regard toits code delta management. For example, the GUI structured editor avoidsformatting incompatibilities that could exist in traditional sourcecode, and helps manage dependencies and re-versioning better. The GUIstructured editor also includes the option to generate dual-pathedobjected code.

As previously discussed with regard to FIGS. 6A-D, the GUI structurededitor can present symbols (e.g., in the form of graphical icons) that,when selected by a user and received by the GUI structured editor, canbe used to generate source code that, when fed into a compiler, isidentical. The following discussion is made with intent to give otherexamples of symbols and or graphical icons that may be used to representJava syntax.

In one example, curly brackets that denote code blocks can be replacedwith a symbol (e.g., a graphical box) while still keeping the textsyntax. Thus, in contrast to traditional source code, indentation ofimbedded code blocks need not be as pronounced because the lines of thebox denote level of grouping. In another embodiment, the graphical boxcan be shaded to different color hues.

In another example, conditions of each block can be represented as aheader to the box, where the initial icon can be clicked/pressed totoggle the folding in and out of view the rest of the box which is thecode block body. An “if” keyword could be represented by a symbol of agraphical “?”. A symbol of a “swirl” could be used to denote a “for”loop. Multi-directional arrow symbols can denote a “switch”. The“switch” block could be depicted as a table, with each “case” as anentry, using a checked box icon whose code block could be folded as alower level block.

The “.” symbol which is used to associate an object with an invokedmethod, or alternatively, a class with a static class method could bereplaced by a larger graphical equivalent that is centered regarding theheight of the line. In some instances, the GUI structured editor canassociate a different user-defined graphical symbol with a class, anobject reference to that class, a method, field, or constant.

In instances where other languages are used, the GUI structured editorcould use a graphical icon such as an actual arrow to denote pointerde-referencing instead of the conventional “->”.

In another example, the GUI structured editor can display a “speechbubble” symbol that points back to the method being invoked instead ofthe traditional parenthesis in parameter lists. A triangular graphicalicon displayed with the speech bubble could be selected by a user (e.g.,via clicking a mouse, pressing the triangle on a touch screen display,etc.) to display a folded in and out view of the parameter list.

In other instances, the use of a triangular graphical icon can be usedto toggle different views of nested code blocks above, nested methodinvocations, nested parenthesis in overriding hierarchy of operations,etc. For example, the GUI structured editor can assign one or moregraphical icons to “fold in or out” of source code view. Commentary neednot be in text form. It could be in various forms of media, such as animage, set of images, video, audio, or traditional text. Variants of theicon could denote the different forms of media. Commentary could beassociated with a line, a code block, a method, a class, etc. and betagged from the corresponding location in the presented view.Conversely, there could be a comments-only view. Instead of maintaininga separate, all-inclusive presentation on a code project, the diagramsand supporting media could be integrated into the code library, wherechange management would help keep all forms of commentary in synch withthe changing code. Consider internal presentation material thattypically covers “locks, blocks, & flows”: the serialization, controlblocks, and overall infrastructure of a project. Continuing theindustry's trend of incorporating documentation of external interfacesinto the code, there would be considerable benefit of the life cycle ofthe product to have internal documentation and supporting media in thatcentral repository.

Accordingly, embodiments of the present invention can display graphicalrepresentations of programming language syntax. Responsive to receivinguser selections of those graphical representations, embodiments of thepresent invention can generate syntactically correct source code withoutthe use of a peripheral keyboard.

FIGS. 8A-D are example screenshots of the transition from a traditional,all-text source to a GUI structured editor display incorporatinggraphical icons, in accordance with an embodiment of the presentinvention.

FIG. 8A is an example screenshot displaying a user interface withtraditional all-text source code. In this example, line 802 a is amethod signature. Particularly, line 802 a displays method Z, and theparameter for the method (e.g., int j). Line 804 a displays a local dataof type int (e.g., myZvar). Line 806 a display a “for loop”. Line 808 adisplays an “if” conditional. Lines 810 a displays another method (e.g.,myOtherMethod) with parameters “i” and “j”.

FIG. 8B is an example screenshot displaying graphical icons thatrepresent the all text view of FIG. 8A. For example, the methodsignature has moved into header 802 b. In instances where a largerscreen is available, a full signature can be displayed. Where a largerscreen is unavailable, the GUI structured editor can shorten the methodsignature by further truncating the signature. Responsive to a userselection (e.g., selecting header 802 b), the GUI structured editorcould open a dialog box with the full signatures. In this embodiment, auser input can be on a touch screen where the user presses a finger inthe center of header 802. In other embodiments a user can input aselection by any method known in the art.

In this example, the graphical representation of line 804 a can be foundin line 804 b. The graphical representation of line 806 a (e.g., the“for loop”) is represented by header 806 b. Line 806 a (e.g., the “if”condition) is graphically represented by header 808 b (e.g., verticallines replace the semicolons of line 806 a. Lines 810 a is visuallyrepresented as box 810 b (e.g., parameters “i” and “j” are graphicallyrepresented by a text bubble separated by a vertical line instead of anopen and closed parenthesis, separated by a comma).

FIGS. 8C and 8D are example screenshots of cold folding, in accordancewith an embodiment of the present invention. For example, the GUIstructured editor can display “. . . ” as a graphical icon that a usermay select to switch between views. In other instances, similargraphical icons may be included to allow parameter lists to be folded.

In FIG. 8C, the GUI structured editor displays graphical icon 812 as avisual indication that a code block such as block 810 b has been hidden.Responsive to receiving a user selection of graphical icon 812, the GUIstructured editor can display block 810 b or hide another block of code(e.g., header 808 b). In this embodiment, a single tap of graphical icon812 can display block 810 b while a double tap of graphical icon 812 canhide header 808 b. In other embodiments a user selection can be a clickof a mouse. In this example, a user has chosen to select 812 in a mannerthat causes header 808 b to be hidden from view. Responsive to receivinga user selection that causes header 808 b to be hidden from view, theGUI structured editor can alter the display to hide header 808 b.

In FIG. 8D, the GUI structured editor displays a graphicalrepresentation of modified source code. Specifically, FIG. 8D shows anexample of code folding responsive to a receiving a user selection. Inthis example, the GUI structured editor has generated a visual displaythat has hidden headers 808 b and 810 b responsive to receiving userselections of FIGS. 8B and 8C. Similarly, in this embodiment, selectinggraphical icon 812 can trigger an option to display block 808 b or hideheader 806 b.

Accordingly, embodiments of the present invention can be used tographically represent source code in a visual display that takes up lessscreen real-estate and is easy to read. Responsive to receiving userselections, embodiments of the present invention can generate and togglebetween different views to expand or collapse blocks of source code(e.g., instructions within a particular method of a class).

FIGS. 9A-9D are additional example screenshots of graphical icons thatcan be displayed using a GUI structured editor, in accordance with anembodiment of the present invention.

FIG. 9A is an example screenshot showing a traditional textual sourcecode. In this example, a method, denoted as “method Z” of type “char” isshown in line 902. A switch block with parameter “x” is depicted in line904. Lines 906, and 912 denote two cases (e.g., case A and case B) ofthe switch block. Line 918 denotes a default. Lines 908 and line 910 areinstructions for “CaseA”. Lines 914 and 916 are instructions for“CaseB”. Lines 920 and Lines 922 are instructions for “Default”.

FIG. 9B is an example screenshot of graphical icons used to depicttraditional textual source code using a GUI structured editor. In thisexample, a switch block (e.g., like switch block of FIG. 9A) is depictedusing graphical icons.

For example, a switch block for character “x” (e.g., box 924) isdepicted by icon 923. Icon 923 is a 3-row box icon representing a“switch”. Icon 925 is a checked circle that represents that box 926 hasbeen selected. Box 928 displays a method for case A (e.g., “doThis”). Inthis example, box 928 does not have an additional icon (such as icon939) that would indicate additional parameters. Icon 929 is a star andis used to represent a break.

Box 930 represents a different case (e.g., Case B). Box 932 displays amethod for Case B (e.g., “doThat”). Icon 931 is a checked circle thatrepresents that box 930 has been selected. Icon 933 is a cursor icon. Inthis example, the cursor icon is a triangle. Icon 934 is a star which isused to denote a break.

Box 936 represents another case (e.g., default). Box 938 displays amethod (e.g., “doOtherThing”) for the default case. Icon 935 is achecked circle that represents that box 936 has been selected. Icon 939is a circle that indicates that denotes a parameter list which can beunfolded if necessary. Icon 937 is a star which is used to denote abreak.

FIG. 9C is an example screenshot that shows how a first level of codefolding can still show the switch variables and the list of cases. Theterm “code folding”, as used herein (also referred to as levelgrouping), refers to a graphic representation of modified source codeorganized by different levels (e.g., nested parameters). In other words,code folding refers to a visual representation of modified source codethat displays headings of instructions without displaying theinstructions themselves.

In this example, icons 940, 942, and 944 are depicted as ellipses (e.g.,“. . . ”). In this example, icons 940, 942, and 944 can toggle betweendisplays responsive to a user selecting one or more of icons 940, 942,and 944. For example, responsive to a receiving a user selection of anicon (e.g., icon 940, 942, or 944), the GUI structured editor candisplay additional information (e.g., methods 928, 932, and 938, notshown).

FIG. 9D is an example screenshot that shows a second level of codefolding. In this example, icon 946 is depicted as an ellipses.Responsive to a user selecting icon 946, the GUI structured editor candisplay boxes 926, 930, and 936 (not shown) as well as icons 940, 942,and 944 (also not shown).

Accordingly, in this embodiment, the GUI structured editor can taketraditional, textual source code and incorporate graphical icons thatwould free up screen real estate.

In another embodiment, the GUI structured editor can aid at runtimedebugging. For example, in an integrated development environment (IDE),a debugging program option of the GUI structured editor can leverage thecode folding feature provided by the GUI structured editor.Specifically, the debugging environment can provide options to break atvarious levels of code blocks generated by the GUI structured editor(e.g., the code folding generated in FIGS. 9A-D).

Typically, a method known as “step tracing” is performed (i.e., code isreviewed one line at a time). A “hit”, as used herein, refers to a point(i.e., line of code) reached during execution of a program that has aspecified “break”. A debugger option of the GUI structured editor canpause the execution of the program allowing a user to check that statusof variables and/or make changes to the line of code.

For example, a user can select a breakpoint option to stop at thebeginning of every method within a class. After one hit (i.e., when adebugger program reaches a line of code at a user-defined break), theGUI structured editor can present an option to break at every sequentialinstruction. In other words, the GUI structured editor can present anoption to break at different levels of code (i.e., code blocks) as shownand described in FIGS. 9A-9D. The option to break could be lifted at anyspot to make the breakpoint hits restricted to a few manually setlocations in the code. Providing the option to break at the top of codeblocks that are one, two, or more levels deep would provide an extendedgranularity to method-level breakpoints. The break options might be setafter a particular method was hit for example. Pseudocode and codecommentary often describe the first one or two levels of blocks tooverview functionality. Functionality would still be achieved regardlessof whether the block is from a conditional, a switch table, a loop, etc.In this embodiment, the views generated by the GUI structured editor canaid in high-level step tracing because the GUI structured editor canshow folded code at various levels of grouping.

The GUI structured editor can, through the use of its code foldingfeature free up screen real estate in a debugging scenario. For example,code folding of the view could initially sync up with the debuggerprogram's configuration option for the code block levels receivingbreakpoints. In instances where the option is a single level deep, theGUI structured editor can generate a display view that initially hidesall code blocks, simply showing the conditional or loop that determinesit. Where the option is two levels deep, then the GUI structurededitor's debugger program can show the code within each first level ofcode blocks, but hide code blocks imbedded within them, etc.

The debugger program can have the option to open up different levels ofthe code blocks at each stop, and even to set the correspondingbreakpoints for the next level of statements within that block with asingle GUI button. In cases of multiple layers of imbedded code blocks,there can be clear visual advantages to folding the code blocks untilthe user decides to trace inside them. Another button can be displayedand responsive to a user selecting the button, the debugger program canremove the various sets of breakpoints at some future stop.

The option to unfold the corresponding assembler or machine code couldbe done in synch with breakpoints, or be kept separate. Run-timedebugging could be optionally done at the assembler instruction levelwith specific register/storage operand values for example, or staticsnapshots of dumped storage could be similarly interpreted. Portions ofsource code can be filtered to show the assembler or machine code ofinterest to the debugger. The debugger program can utilize a GUI displaysimilar to the GUI structured editor display to switch to or pop-up acorresponding view of the data responsive to a user selection. In arun-time debugging environment, this could alternatively create amonitor of that data. The debugger can, optionally, use a pop-up or amonitor for a high-level variable or the corresponding register/storageoperand.

In instances where automated test cases are used, the breakpointtechnology described above can be leveraged to ensure a certain codepath is taken. Combinations of breakpoints could optionally be stored asindependent manual test configurations. In addition to a set ofautomated test cases, the debugger may want to maintain a documented setof manual ones with a stored, consistent set of breakpoints to repeatthe test. These debugging scenarios could be saved by the IDE and rerunwith the touch of a button.

The notion of a user preference of code block nesting levels wouldextend well into debugging activities, either run-time or from snapshotdumps. The GUI structured editor display outputs could be leveraged andwould extend the capability of mobile-based programming to debugging inits minimizing of screen real estate. The display outputs (e.g., thegraphical representation of modified source code organized into easy toview groupings) would provide high level view of the code that couldextend into breakpoint settings, including saved settings for automatedregression testing. Finally, the GUI structured editor would also allowthe debugger to focus on areas of interest within the listing, such asselectively displaying portions of assembler or machine code for theproblem area.

Accordingly, leveraging the code blocks generated by the GUI structurededitor regardless of whether or not the programming language isdependent on indentation can provide a more granular extension tobreaking at the beginning of each method. Providing increasedgranularity can save developers time and complement existing theexisting source code view that may already utilize code folding.

IV. Definitions

Present invention: should not be taken as an absolute indication thatthe subject matter described by the term “present invention” is coveredby either the claims as they are filed, or by the claims that mayeventually issue after patent prosecution; while the term “presentinvention” is used to help the reader to get a general feel for whichdisclosures herein are believed to potentially be new, thisunderstanding, as indicated by use of the term “present invention,” istentative and provisional and subject to change over the course ofpatent prosecution as relevant information is developed and as theclaims are potentially amended.

Embodiment: see definition of “present invention” above—similar cautionsapply to the term “embodiment.”

and/or: inclusive or; for example, A, B “and/or” C means that at leastone of A or B or C is true and applicable.

Including/include/includes: unless otherwise explicitly noted, means“including but not necessarily limited to.”

Module/Sub-Module: any set of hardware, firmware and/or software thatoperatively works to do some kind of function, without regard to whetherthe module is: (i) in a single local proximity; (ii) distributed over awide area; (iii) in a single proximity within a larger piece of softwarecode; (iv) located within a single piece of software code; (v) locatedin a single storage device, memory or medium; (vi) mechanicallyconnected; (vii) electrically connected; and/or (viii) connected in datacommunication.

Computer: any device with significant data processing and/or machinereadable instruction reading capabilities including, but not limited to:desktop computers, mainframe computers, laptop computers,field-programmable gate array (FPGA) based devices, smart phones,personal digital assistants (PDAs), body-mounted or inserted computers,embedded device style computers, application-specific integrated circuit(ASIC) based devices.

What is claimed is:
 1. A computer program product comprising: one ormore computer readable storage media and program instructions stored onthe one or more computer readable storage media, the programinstructions comprising: program instructions to receive one or moresymbols indicating tasks to be implemented via source code; programinstructions to generate a visual display comprising a dialog boxsupporting modification of source code that implements the executableinstructions indicated by the one or more symbols; program instructionsto, responsive to receiving a user interaction with the dialog boxresulting in modified source code, generate a visual display comprisinga dialog box output, wherein the dialog box output is one of themodified source code or a representation of the modified source codethat is shorter than the modified source code; program instructions toprovide an opportunity to toggle the generated visual display betweendisplaying the modified source code and the representation of themodified source code that is shorter than the modified source code,wherein the representation of the modified source code that is shorterthan the modified source code includes the one or more symbols; programinstructions to, responsive to receiving a modification of the one ormore symbols included in the displayed representation of the modifiedsource code that is shorter than the modified source code, update allinstances of source code corresponding to the one or more symbols;program instructions to, responsive to receiving the modification of theone or more symbols included in the displayed representation of themodified source code that is shorter than the modified source code,store a first delta value associated with a first modification of theone or more symbols and a second delta value associated with a secondmodification of the one or more symbols, wherein the first delta valueand the second delta value each correspond to a different view of therespective first and second modifications; program instructions to,responsive to receiving a query for the first delta value, display theview associated with the first delta value; program instructions to,responsive to receiving a query for the second delta value, display theview associated with the second delta value; program instructions toprovide an option to generate multi-pathed object code with theutilization of the first and second delta values; program instructionsto provide an option to debug the modified source code, wherein theoption to debug the source code pauses execution of the source codeaccording to the instruction headings; program instructions to,responsive to receiving a query for the first delta value, display theview associated with the first delta value; program instructions toprovide an option to generate multi-pathed object code with theutilization of the first and second delta values; and programinstructions to provide an option to debug the modified source code,wherein the option to debug the source code pauses execution of thesource code according to the instruction headings.